<template>
  <div class="home">
    <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
      <van-swipe-item v-for="item in swipers" :key="item.id">
        <img v-lazy="item.img" />
      </van-swipe-item>
    </van-swipe>

    <van-nav-bar
      left-text="正在热映"
      right-text="按钮"
      @click-right="onClickRight"
    >
      <template #right>
        <span>全部19部</span>
        <van-icon name="arrow" />
      </template>
    </van-nav-bar>
  </div>
</template>

<script>
export default {
  name: 'HomeView',
  data () {
    return {
      swipers: [
        {
          id: 1,
          img: require('../assets/swiper/1.jpg')
        },
        {
          id: 2,
          img: require('../assets/swiper/2.jpg')
        },
        {
          id: 3,
          img: require('../assets/swiper/3.jpg')
        },
        {
          id: 4,
          img: require('../assets/swiper/4.jpg')
        }
      ]
    }
  },
  components: {}
}
</script>
<style lang="less" scoped>
.my-swipe img {
  width: 100%;
}
</style>
